package com.erp.pojo.warehouse;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 损毁表
 * @TableName warehouse_mar_info
 */
@TableName(value ="warehouse_mar_info")
@Data
public class WarehouseMarInfo implements Serializable {
    /**
     * id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 产品详情表id
     */
    @TableField(value = "product_info_id")
    private Long product_info_id;

    /**
     * 损毁表id
     */
    @TableField(value = "product_mar_id")
    private Long product_mar_id;

    /**
     * 损坏数量
     */
    @TableField(value = "num")
    private Integer num;

    /**
     * 存坏总金额
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date create_time;

    /**
     * 备注
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 汇报人
     */
    @TableField(value = "person_name")
    private String person_name;

    /**
     * 照片
     */
    @TableField(value = "img")
    private String img;

    /**
     * 状态 0等待中 1已核实 2未通过
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 采购订单详情id
     */
    @TableField(value = "purchaser_orders_info_id")
    private Long purchaser_orders_info_id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WarehouseMarInfo other = (WarehouseMarInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProduct_info_id() == null ? other.getProduct_info_id() == null : this.getProduct_info_id().equals(other.getProduct_info_id()))
            && (this.getProduct_mar_id() == null ? other.getProduct_mar_id() == null : this.getProduct_mar_id().equals(other.getProduct_mar_id()))
            && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getPerson_name() == null ? other.getPerson_name() == null : this.getPerson_name().equals(other.getPerson_name()))
            && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getPurchaser_orders_info_id() == null ? other.getPurchaser_orders_info_id() == null : this.getPurchaser_orders_info_id().equals(other.getPurchaser_orders_info_id()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProduct_info_id() == null) ? 0 : getProduct_info_id().hashCode());
        result = prime * result + ((getProduct_mar_id() == null) ? 0 : getProduct_mar_id().hashCode());
        result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getPerson_name() == null) ? 0 : getPerson_name().hashCode());
        result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getPurchaser_orders_info_id() == null) ? 0 : getPurchaser_orders_info_id().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", product_info_id=").append(product_info_id);
        sb.append(", product_mar_id=").append(product_mar_id);
        sb.append(", num=").append(num);
        sb.append(", price=").append(price);
        sb.append(", create_time=").append(create_time);
        sb.append(", remarks=").append(remarks);
        sb.append(", person_name=").append(person_name);
        sb.append(", img=").append(img);
        sb.append(", status=").append(status);
        sb.append(", purchaser_orders_info_id=").append(purchaser_orders_info_id);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}